import {createBrowserRouter, Navigate} from "react-router-dom";
import Layout from "../layout/index.jsx";
import Home from "../views/home/home.jsx";
import activityRoutes from '@/router/activity.jsx'
import loginRoutes from './login.jsx'
import PersonalCenterRoutes from '@/router/personalCenter.jsx'
import cultureCardRoutes from '@/router/cultureCard.jsx'
import NotFound from "@/views/error/404.jsx";
const router = createBrowserRouter([
  {
    path: "/",
    element: <Navigate to="/home" replace={true}></Navigate>
  },
  {
    path: "/",
    Component:Layout,
    children: [
      {
        path: "/home",
        Component: Home,
        handle:{
          moduleType:1
        }
      },

    ],
  },
    ...cultureCardRoutes,
    ...activityRoutes,
    ...loginRoutes,
    ...PersonalCenterRoutes,
  {
    path: '*',
    Component:NotFound
  }
]);
export default router;